﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="vizsgaSorKezeles.aspx.cs" Inherits="NEMProjectWebApp.Pages.Oktato.vizsgaKezeles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style5
        {
            width: 350px;
        }
        .style6
        {
            width: 89px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width: 100%;">
        <tr>
            <td class="style5">
                <asp:Label ID="Label1" runat="server" Text="Tárgy:"></asp:Label>
                <asp:DropDownList ID="TargyDropDownList" runat="server" Width="300px" AutoPostBack="True"
                    DataSourceID="SqlDataSource" DataTextField="TargyNeve" DataValueField="T_ID"
                    OnSelectedIndexChanged="TargyDropDownList_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:masterConnectionString %>"
                    SelectCommand="SELECT [TargyNeve], [T_ID] FROM [Targy]"></asp:SqlDataSource>
                <br />
                <asp:Label ID="Label2" runat="server" Text="Vizsgasorok:"></asp:Label>
                <asp:DropDownList ID="VizsgasorokDropDownList" runat="server" Width="300px" AutoPostBack="True"
                    DataSourceID="SqlDataSource2" DataTextField="VizsgasorNeve" DataValueField="Vizsgasor_ID"
                    OnSelectedIndexChanged="VizsgasorokDropDownList_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:masterConnectionString %>"
                    SelectCommand="SELECT [VizsgasorNeve], [Vizsgasor_ID] FROM [VizsgaSor]"></asp:SqlDataSource>
            </td>
            <td colspan="2">
                <asp:Button ID="MentesButton" runat="server" Text="Vizsgasor Mentése"
                    Height="60px" onclick="MentesButton_Click" />
            </td>
        </tr>
        <tr>
            <td class="style5" colspan="3">
                <asp:Label ID="Label3" runat="server" Text="Vizsgasor megnevezése:"></asp:Label>
                <asp:TextBox ID="Textbox1" runat="server" Text="" Width="350"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style5">
                <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"
                    RepeatColumns="2" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
                    <asp:ListItem Text="Próba vizsga" Value="1"></asp:ListItem>
                    <asp:ListItem Text="Valódi vizsga" Value="0"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="style5" colspan="2">
                <asp:Label ID="Label4" runat="server" Text="Tárgy vizsgakérdései:"></asp:Label>
            </td>
            <td>
                <asp:Label ID="Label5" runat="server" Text="Vizsgasor kérdései:"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style5">
                <asp:ListBox ID="ListBox1" runat="server" Height="300px" Width="300px" SelectionMode="Multiple"
                    DataSourceID="kerdesekSqlDataSource" DataTextField="Kerdes" DataValueField="VK_ID"></asp:ListBox>
                <asp:SqlDataSource ID="kerdesekSqlDataSource" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:masterConnectionString %>" 
                    SelectCommand="SELECT VK_ID, Kerdes, isPublic FROM VizsgaKerd WHERE (TargyID = @Targy_ID) AND (isPublic = IsPublic) ">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="TargyDropDownList" DefaultValue="0" 
                            Name="Targy_ID" PropertyName="SelectedValue" />
                        <asp:ControlParameter ControlID="RadioButtonList1" DefaultValue="0"
                            Name="IsPublic" PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class="style6">
                <asp:Button ID="Bal" runat="server" Text="-->" OnClick="HozzaadVizsgahozButton_Click" />
                <br />
                <br />
                <br />
                <br />
                <br />
                <asp:Button ID="Jobb" runat="server" Text="<--" OnClick="ElveszVizsgabolButton_Click"/>
            </td>
            <td>
                <asp:ListBox ID="ListBox2" runat="server" Height="300px" Width="300px" SelectionMode="Multiple"></asp:ListBox>
            </td>
        </tr>
    </table>
</asp:Content>
